//
//  JXRequestID.m
//  Demo
//
//  Created by xiu on 2020/4/22.
//  Copyright © 2020 111. All rights reserved.
//

#import "JXRequestManager.h"

@implementation JXRequestManager
+ (JXRequestManager *)sharedInstance {
    static JXRequestManager *_manager = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _manager = [[JXRequestManager alloc] init];
        [_manager.requestSerializer setTimeoutInterval:15];
        _manager.responseSerializer.acceptableContentTypes=
        [NSSet setWithObjects:@"application/json", @"text/json",@"text/javascript",@"text/html",@"text/plain",nil];
        [_manager.requestSerializer setValue:@"gzip" forHTTPHeaderField:@"Accept-Encoding"];
    });
    return _manager;
}
@end

@implementation LOError

- (id)initWithText:(NSString *)text errCode:(NSInteger)code{
    self = [super init];
    if (self){
        self.text = text;
        self.code = code;
    }
    return self;
}
@end
